package com.codeZ.BuilderPattern.example01;

import com.codeZ.BuilderPattern.example01.builder.Builder;
import com.codeZ.BuilderPattern.example01.builder.HelloBuilder;
import com.codeZ.BuilderPattern.example01.builder.MobikeBuilder;
import com.codeZ.BuilderPattern.example01.product.Bike;

/**
 * 客户端类
 *
 * @author codeZhang
 * @Date 2024/8/2 16:11
 */
public class Client {
    public static void main(String[] args) {
        showBike(new HelloBuilder());
        showBike(new MobikeBuilder());
    }

    private static void showBike(Builder builder) {
        Director director = new Director(builder);
        Bike bike = director.construct();
        System.out.println(bike.getFrame());
        System.out.println(bike.getSeat());
    }

}
